package com.example.mvvmdemo.home.paging;

import androidx.recyclerview.widget.DiffUtil;

import com.example.mvvmdemo.base.paging.BasePagingAdapter;
import com.example.mvvmdemo.base.paging.BaseViewHolder;
import com.example.mvvmdemo.databinding.ItemDeviceBinding;

import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * created by tl
 * created at 2020/9/2
 */
public class DeviceAdapter extends BasePagingAdapter<DeviceExceptionBean.ContentBean, ItemDeviceBinding> {
    public DeviceAdapter( int layoutID, @NotNull DiffUtil.ItemCallback<DeviceExceptionBean.ContentBean> diffCallback) {
        super( layoutID, diffCallback);
    }

    @Override
    protected void bindDataToView(BaseViewHolder<ItemDeviceBinding> holder, DeviceExceptionBean.ContentBean item, int position) {
        holder.binding.deviceNameTv.setText(item.getVequipmentName());
        holder.binding.deviceTypeTv.setText(item.getEquipmentModel());
    }
}
